﻿using System;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using Core.Base.Module;
using Core.Base.UI;
using Core.Extension;
using Core.Mgr._ResMgr;
using Core.Mgr.Localize;
using CsvHelper;
using Logic.Fight;
using UnityEngine;
using UnityEngine.UI;

namespace Logic.Global.UI
{
    /// <summary>
    /// 首页
    /// </summary>
    [UI("HomeUI", EUIType.BaseCanvas, false, EScreenMatchMode.Height)]
    public class HomeUI : BaseUI
    {
        public Button btnGoFight;
        public Button btnGoZhuangXiu;

        public override void OnInit(UIAttribute uiAttribute)
        {
            base.OnInit(uiAttribute);
            btnGoFight.BindEvent(OnClickBtnGoFightModule);
            btnGoZhuangXiu.BindEvent(OnClickBtnGoZhuangXiu);
            
        }

        private void OnClickBtnGoZhuangXiu()
        {
            Debug.Log("抵达装修");
        }

        private void OnClickBtnGoFightModule()
        {
            OnClose();
            // 加载战斗模块
            ModuleMgr.Ins.LoadModule<FightModule>();
        }
    }
}